<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<%@include file="/WEB-INF/pages/include/prelude.jspf"%>
<%@include file="/WEB-INF/pages/include/common.jspf"%>
<link href="<c:url value='/static/css/assignee.css' />" type="text/css" rel="stylesheet"/>
<title>受让人管理</title>
<script type="text/javascript">
$(function(){
   	$("#pagetitle").html('受让人管理');
   	
   	if(''!='${msg}'){
   		alert('${msg}');
   	}
   	
    $('#header #pageback a').attr('href', '<c:url value="/member/inMemberInfo.do"/>');
    $('#header #pageback a').attr('data-ajax', 'false');
});
</script>
</head>
<body>
<div  data-role="page">
	<%@include file="/WEB-INF/pages/include/header.jsp"%>
	<div data-role="content">
		<div class="m_assign">
			<ul>
			<c:forEach items="${alieneeList}" var="alienee">
				<li>
					<div class="m_assign_two">
						<span>${alienee.firstName } ${alienee.lastName} </span><br />
						<span>${alienee.CNFirstName } ${alienee.CNLastName} </span>
					</div>
					<div class="m_assign_one">
						<span>身份证：</span><br/>
						<span>
						 <c:forEach items="${alienee.credentialList.credential }" var="credential">
							<c:if test="${credential.credentialType=='ID Card' }">
								<c:out value="${credential.credentialNumber }"></c:out>
							</c:if>
						</c:forEach> 
						</span>
					</div>
					<div class="m_assign_one2">
						<span><a data-role="none" href="javascript:;" onclick="window.location.href='<c:url value='/member/inAssignManager.do?act=edit&alieneeId=${alienee.alieneeId }'/>'"><img alt="修改" width="25px" src="<c:url value='/static/img/imgs/img_edit.png' />"></a></span><br />
						<span><a data-role="none" href="javascript:;" onclick="window.location.href='<c:url value='/member/inAssignDelete.do?alieneeId=${alienee.alieneeId }'/>'" data-ajax="false"><img alt="删除" width="25px" src="<c:url value='/static/img/imgs/img_del.png' />"></a></span>
					</div>
					<c:if test="${fn:length(alienee.credentialList.credential)>1 }">
					<div class="m_assign_more_credential">
						<a href="#" style=" color: blue;" onclick="$(this).next().slideToggle('slow');">查看其他证件信息</a>
						<ul style="display: none;" >
							<c:forEach items="${alienee.credentialList.credential }" var="credential">
							<c:if test="${credential.credentialType!='ID Card' }">
								<c:out value="${credentialTypes[credential.credentialType] }"></c:out>：
								<c:out value="${credential.credentialNumber }"></c:out>
							</c:if>
							</c:forEach>
						</ul>
					</div>
					</c:if>
					<div style="clear:both"></div>
				</li>
			</c:forEach>
			</ul>
		</div>
		<br />
		<div>
			<div class="assign_xz">
			<div class="assign_xz_tl">受让人须知</div>
			<p>
			1、会员兑换国航奖励机票或奖励升舱，除本人使用外，仅能转让给会员指定的已生效的兑奖受让人使用。会员兑换知音商城产品，不受该限制。
			</p>
			<div class="assign_xz_bo"><a data-role="none" href="<c:url value='/member/inAssignNotice.do?act=view' />">查看详情</a></div>
			</div>
		<c:if test="${fn:length(alieneeList)<8 }">
			<div><button class="btn" onclick="window.location.href='<c:url value='/member/inAssignNotice.do' />'" data-theme="a" type="button">添加受让人</button></div>
		</c:if>
		</div>
	</div>
</div>
</body>
</html>